/*
 * @Date: 2021-02-15 12:26:40
 * @LastEditors: 小枫
 * @description: 服务器入口
 * @LastEditTime: 2021-02-15 12:34:52
 * @FilePath: \ssr\src\server-entry.js
 */
import createApp from './app'

export default context => {
  return new Promise((resolve, reject) => {
    const { app, router } = createApp()
    // 进入首屏
    router.push(context.url)
    router.onReady(() => {
      resolve(app)
    }, reject)
  })
}
